def format_timedelta(timedelta):
    milliseconds = timedelta.microseconds // 1000
    minutes = timedelta.seconds // 60
    seconds = timedelta.seconds % 60
    hours = minutes // 60
    minutes = minutes % 60
    
    return '%d:%02d:%02d.%03d' % (hours, minutes, seconds, milliseconds)
